package edu.uc.serviceimpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import java.util.*;
import edu.uc.bean.*;
import edu.uc.dao.*;
import edu.uc.service.*;

@Service("memberService")
public class MemberServiceImpl extends BaseServiceImpl<Member> implements MemberService{

	private MemberDao memberDao = null;
	
	public MemberDao getMemberDao() {
		return memberDao;
	}
	
	@Autowired
	@Qualifier("memberDao")
	public void setMemberDao(MemberDao memberDao) {
		this.memberDao = memberDao;
	}
	
	@Override
	public Long insert(Member bean) {
		// TODO Auto-generated method stub
		return memberDao.insert(bean);

	}

	@Override
	public Long delete(Long id) {
		// TODO Auto-generated method stub
		return memberDao.delete(id);

	}

	@Override
	public Long update(Member bean) {
		// TODO Auto-generated method stub
		return memberDao.update(bean);
	}

	@Override
	public Member load(Long id) {
		// TODO Auto-generated method stub
		return memberDao.load(id);
	}

	@Override
	public List<Member> list() {
		// TODO Auto-generated method stub
		return memberDao.list();
	}

	@Override
	public Long count() {
		// TODO Auto-generated method stub
		return memberDao.count();
	}

	@Override
	public Long countByName(String name) {
		// TODO Auto-generated method stub
		return memberDao.countByName(name);
	}

	@Override
	public Member loadByName(String name) {
		// TODO Auto-generated method stub
		return memberDao.loadByName(name);
	}

	@Override
	public List<Member> pager(Long pageNum, Long pageSize) {
		// TODO Auto-generated method stub
		return memberDao.pager(pageNum, pageSize);
	}

	@Override
	public List<Member> pagerByName(String name, Long pageNum, Long pageSize) {
		// TODO Auto-generated method stub
		return memberDao.pagerByName(name, pageNum, pageSize);
	}

}
